package fu.capstone.hanoicityguide.business.bo.restaurant;

import java.util.ArrayList;

import android.content.Context;
import fu.capstone.hanoicityguide.business.model.Category;
import fu.capstone.hanoicityguide.business.model.Restaurant;
import fu.capstone.hanoicityguide.dataaccess.restaurant.RestaurantDAO;
import fu.capstone.hanoicityguide.dataaccess.restaurant.RestaurantDAOImp;

public class RestaurantBOImp implements RestaurantBO {
	private Context context;

	private RestaurantDAO dao;

	public Context getContext() {
		return context;
	}

	public void setContext(Context context) {
		this.context = context;
	}

	public RestaurantBOImp() {

	}

	public RestaurantBOImp(Context ctx) {
		this.context = ctx;
		dao = new RestaurantDAOImp(context);
	}

	@Override
	public ArrayList<Restaurant> listRestaurant(ArrayList<String> filter,
			String sorter) {
		// get list attraction by filter and sorter
		return dao.listRestaurant(filter, sorter);
	}

	@Override
	public ArrayList<Restaurant> searchRestaurant(String keyWord,
			ArrayList<String> filter, String sorter) {
		return dao.searchRestaurant(keyWord, filter, sorter);
	}

	@Override
	public Restaurant browseRestaurant(int restaurantID) {
		return dao.browseRestaurant(restaurantID);
	}

	@Override
	public String[] getListType(int categoryID) {
		return dao.getListType(categoryID);
	}

	@Override
	public ArrayList<Category> getListCategory(String filter) {
		return dao.getListCategory(filter);
	}

}
